/* I2C-24C02 读写实验平台样式 */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.container {
    max-width: 1200px;
}

/* 按钮动画效果 */
button {
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

button:active {
    transform: translateY(0);
}

/* 输入框焦点效果 */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 日志区域样式 */
#logDisplay {
    line-height: 1.4;
}

#logDisplay::-webkit-scrollbar {
    width: 6px;
}

#logDisplay::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#logDisplay::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

#logDisplay::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 数据展示区域样式 */
#hexDisplay, #asciiDisplay, #decimalDisplay {
    min-height: 100px;
    word-break: break-all;
}

/* 响应式布局调整 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功/错误提示 */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
